package com.kakarote.hrm;

import lombok.Getter;

@Getter
public enum ProbationEnum {
    ZERO(0, "无试用期"),
    ONE(1, "1个月"),
    TWO(2, "2个月"),
    THREE(3, "3个月"),
    FOUR(4, "4个月"),
    FIVE(5, "5个月"),
    SIX(6, "6个月");

    private Integer value;
    private String name;

    ProbationEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getNameByValue(Integer value) {
        for (ProbationEnum educationEnum : ProbationEnum.values()) {
            if (educationEnum.getValue().equals(value)) {
                return educationEnum.getName();
            }
        }
        return "";
    }


}
